www.gusucode.com > 6KBBS ASP版 V7.1 > 6KBBS ASP版 V7.1\code\bbs\inc\getHttpPage.asp

    <%
      function getHttpPage(url) 
        on error resume next 
        dim http 
        set http=Server.createobject("Microsoft.XMLHTTP") 
        Http.open "GET",url,false 
        Http.send() 
        if Http.readystate<>4 then
            exit function 
        end if 
        getHttpPage=bytes2BSTR(Http.responseBody) 
        set http=nothing
        if err.number<>0 then err.Clear  
    end function 
    
    Function bytes2BSTR(vIn) 
        dim strReturn 
        dim i1,ThisCharCode,NextCharCode 
        strReturn = "" 
        For i1 = 1 To LenB(vIn) 
            ThisCharCode = AscB(MidB(vIn,i1,1)) 
            If ThisCharCode < &H80 Then 
                strReturn = strReturn & Chr(ThisCharCode) 
            Else 
                NextCharCode = AscB(MidB(vIn,i1+1,1)) 
                strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) 
                i1 = i1 + 1 
            End If 
        Next 
        bytes2BSTR = strReturn 
    End Function 
%>